﻿using System;
using System.Collections.Generic;

namespace RexToy.UI.WinForm.Pmlx
{
    public class StyleCollection
    {
        private Dictionary<string, Style> _dict;
        public StyleCollection()
        {
            _dict = new Dictionary<string, Style>();
        }

        internal Style this[string key]
        {
            get
            {
                if (_dict.ContainsKey(key))
                    return _dict[key];
                else
                    return Style.None;
            }
            set
            {
                value.ThrowIfNullArgument("value");
                _dict[key] = value;
            }
        }
    }
}
